home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Celestin Apprentice 5
/
Apprentice-Release5.iso
/
Source Code
/
C
/
Frameworks
/
TransSkel 3.24
/
Source
/
SkelPause.c
< prev
next >
Wrap
Text File
|
1996-01-17
|
711b
|
31 lines
/*
* SkelPause ()
*
* Pause process execution for the given length of time, measured in ticks
* (60ths of a second). If running in a multitasking environment, gives
* time to other processes, using the wait value that's appropriate for
* whether the application's in the foreground or background.
*/
# include "TransSkel.h"
pascal void
SkelPause (long ticks)
{
long current;
long waitTime;
EventRecord event;
if (SkelQuery (skelQInForeground))
SkelGetWaitTimes (&waitTime, (long *) nil);
else
SkelGetWaitTimes ((long *) nil, &waitTime);
current = TickCount ();
while (TickCount () < current + ticks)
{
if (SkelQuery (skelQHasWNE))
(void) WaitNextEvent (0, &event, waitTime, nil);
}
}